package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SalonCategoryMapper;
import com.ruoyi.system.domain.SalonCategory;
import com.ruoyi.system.service.ISalonCategoryService;

/**
 * categoryService业务层处理
 * 
 * @author 23
 * @date 2022-03-30
 */
@Service
public class SalonCategoryServiceImpl implements ISalonCategoryService 
{
    @Autowired
    private SalonCategoryMapper salonCategoryMapper;

    /**
     * 查询category
     * 
     * @param categoryId category主键
     * @return category
     */
    @Override
    public SalonCategory selectSalonCategoryByCategoryId(Integer categoryId)
    {
        return salonCategoryMapper.selectSalonCategoryByCategoryId(categoryId);
    }

    /**
     * 查询category列表
     * 
     * @param salonCategory category
     * @return category
     */
    @Override
    public List<SalonCategory> selectSalonCategoryList(SalonCategory salonCategory)
    {
        return salonCategoryMapper.selectSalonCategoryList(salonCategory);
    }

    /**
     * 新增category
     * 
     * @param salonCategory category
     * @return 结果
     */
    @Override
    public int insertSalonCategory(SalonCategory salonCategory)
    {
        return salonCategoryMapper.insertSalonCategory(salonCategory);
    }

    /**
     * 修改category
     * 
     * @param salonCategory category
     * @return 结果
     */
    @Override
    public int updateSalonCategory(SalonCategory salonCategory)
    {
        return salonCategoryMapper.updateSalonCategory(salonCategory);
    }

    /**
     * 批量删除category
     * 
     * @param categoryIds 需要删除的category主键
     * @return 结果
     */
    @Override
    public int deleteSalonCategoryByCategoryIds(Integer[] categoryIds)
    {
        return salonCategoryMapper.deleteSalonCategoryByCategoryIds(categoryIds);
    }

    /**
     * 删除category信息
     * 
     * @param categoryId category主键
     * @return 结果
     */
    @Override
    public int deleteSalonCategoryByCategoryId(Integer categoryId)
    {
        return salonCategoryMapper.deleteSalonCategoryByCategoryId(categoryId);
    }
}
